package com.my.blog.website.dao;

import com.my.blog.website.model.TEgg;
import com.my.blog.website.model.TEggBehavior;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * Created by lxf on 2020/7/14
 */
public interface EggMapper {
    @Insert("insert into t_egg_behavior (wants, ip) values (#{wants}, #{ip})")
    Integer insertEggBehavior(String wants, String ip);

    @Select("select * from t_egg where input like concat('%',#{input},'%') limit 1")
    TEgg queryOneEgg(@Param("input") String input);
}
